using System;
using Microsoft.Web.Management.Client;
using Microsoft.Web.Management.Server;

namespace Microsoft.Web.Management.Iis.Client
{
    /// <summary>
    /// Represents a module service proxy for the logging module.
    /// </summary>
    internal sealed class LoggingModuleServiceProxy : ModuleServiceProxy
    {
        /// <summary>
        /// Gets a PropertyBag object that contains configuration settings.
        /// </summary>
        /// <returns>A PropertyBag object that contains configuration settings.</returns>
        internal PropertyBag GetConfigurationSettings()
        {
            return Invoke("GetConfigurationSettings", new object[0]) as PropertyBag;
        }

        /// <summary>
        /// Updates httpLogging settings
        /// </summary>
        /// <remarks>
        /// Settings in the property bag should correspond to values found in the system.webServer/httpLogging configuration path
        /// </remarks>
        /// <param name="propertyBag">Property bag that contains values to update the configuration system.</param>
        internal Boolean UpdateHttpLogSettings(PropertyBag propertyBag)
        {
            return (Boolean) Invoke("UpdateHttpLogSettings", new object[] {propertyBag});
        }

        /// <summary>
        /// Updates site and siteDefaults settings
        /// </summary>
        /// <remarks>
        /// Settings in the property bag should correspond to values found in the system.applicationHost/log/sites/siteDefaults/logFile and system.applicationHost/log/sites/site/logFile configuration paths
        /// </remarks>
        /// <param name="propertyBag">Property bag that contains values to update the configuration system.</param>
        internal Boolean UpdateSiteSettings(PropertyBag propertyBag)
        {
            return (Boolean) Invoke("UpdateSiteSettings", new object[] {propertyBag});
        }

        /// <summary>
        /// Updates applicationHost log settings
        /// </summary>
        /// <remarks>
        /// Settings in the property bag should correspond to values found in the system.applicationHost/log configuration path
        /// </remarks>
        /// <param name="propertyBag">Property bag that contains values to update the configuration system.</param>
        internal Boolean UpdateApplicationHostLogSettings(PropertyBag propertyBag)
        {
            return (Boolean) Invoke("UpdateApplicationHostLogSettings", new object[] {propertyBag});
        }

        /// <summary>
        /// Updates applicationHost central binary log settings
        /// </summary>
        /// <remarks>
        /// Settings in the property bag should correspond to values found in the system.applicationHost/log configuration path
        /// </remarks>
        /// <param name="propertyBag">Property bag that contains values to update the configuration system.</param>
        internal Boolean UpdateCentralBinaryLogSettings(PropertyBag propertyBag)
        {
            return (Boolean) Invoke("UpdateCentralBinaryLogSettings", new object[] {propertyBag});
        }

        /// <summary>
        /// Updates applicationHost central w3c log settings
        /// </summary>
        /// <remarks>
        /// Settings in the property bag should correspond to values found in the system.applicationHost/log configuration path
        /// </remarks>
        /// <param name="propertyBag">Property bag that contains values to update the configuration system.</param>
        internal Boolean UpdateCentralW3CLogSettings(PropertyBag propertyBag)
        {
            return (Boolean) Invoke("UpdateCentralW3CLogSettings", new object[] {propertyBag});
        }
    }
}